import request from '@/utils/requset'
export default {
 
    //添加购物车的接口
    reqToCart (skuId:any,skuNum:any){
        return request.post(`/cart/addToCart/${ skuId }/${ skuNum }`)
    },

    //获取购物车详情的接口
    reqCartList (){
        return request.get(`/cart/cartList`)
    },

    //购物车单个选中接口
    reqCheckCart(skuId:any, isChecked:any){
        return request.get(`/cart/checkCart/${skuId}/${isChecked}`)
    },

    //购物车，删除单个商品
    reqDeleteCart(skuId:any){
        return request.delete(`/cart/deleteCart/${skuId}`)
    },

    //全选购物车的商品
    reqBatchCheckCart(isChecked:any, skuIdList:any){
        return request.post(`/cart/batchCheckCart/${isChecked}`, skuIdList)
    },

    //批量删除购物车
    reqBatchDeleteCart(skuIdList:any){
        return request.post(`/cart/batchDeleteCart`, skuIdList)
    }
}